﻿@model MPExtended.Services.MediaAccessService.Interfaces.WebPictureDirectory
@{
    ViewBag.Title = "Picture";
}
<style type="text/css">
    .picture
    {
        overflow: hidden;
        min-width: 700px;
        list-style-type:none;
    }
    
    .picture li
    {
        width: 250px;
        float: left;
        margin: 15px;
    }
    .img
    {
        max-width: 250px;
        max-height: 250px;
    }
    .column
    {
        float: left;
        margin-right: 10px;
    }
</style>
<h2>Picture</h2>
<div class="column">
<ul class="folder">
@foreach (var dir in @Model.SubDirectories)
{
    string[] path = dir.Split(@"\".ToArray(),StringSplitOptions.RemoveEmptyEntries);
<li>
@Html.ActionLink(path[path.Length-1], "Browse", new { path = Server.UrlTokenEncode(new System.Text.ASCIIEncoding().GetBytes(dir)) })
</li>

}
</ul>
</div>
<div class="column">
    <ul class="picture">
        @foreach (var picture in @Model.Pictures)
        {

            <li>
                <img class="img" src="@Url.Action("Image", new { path = Server.UrlTokenEncode(new System.Text.ASCIIEncoding().GetBytes(picture.Filename)) })" alt="" /></li>
        }
    </ul>
</div>
